package com.dao.luo;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.entity.Word;

public interface WordDao extends CrudRepository<Word, Long>{
	/*
	 * @Query("from Word word asc left join fetch word.wordsels") public
	 * List<Object[]> getWordByAsc();
	 */
	public List<Word> findByOrderByWordnoAsc();
	
	@Query("from Word word inner join fetch word.wordtype wt"
			+ " where wt.wtno = ?1  order by word.wordno asc")
	public List<Word> findWordsByWtno(Long wtno);
}